<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
     //对象拓展运算符
    //1、拷贝对象
    let person1 = {name: 'zhangsan', age: 23};
    let someone = {...person1};
    console.log(someone);
    //2.合并对象
    let age = {age: 34};
    let name = {name: 'lisi'};
    let person2 = {...age, ...name};
    console.log(person2);
  </script>
</body>
</html>